/**
 * 
 */
package com.chocolatefordogs.writersnb.notes;

import java.util.Date;

/**
 * @author Matthew
 * 
 */
public final class Note {

	public String getText() {
		return text;
	}

	public void setText(final String text) {
		this.text = text;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(final String title) {
		this.title = title;
	}

	public Date getCreatedOn() {
		return new Date(createdOn);
	}

	public void setCreatedOn(final Date createdOn) {
		if (createdOn == null) {
			this.createdOn = -1;
		} else {
			this.createdOn = createdOn.getTime();
		}
	}
	
	@Override
	public String toString() {
		return getTitle();
	}



	private String text;
	private String title;
	private long createdOn;
}
